package com.test1;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Test1 extends HttpServlet {

	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {	
		String result = "99";
		String number = req.getParameter("number");
		 int j=10;
		 for(int a=0;a<6;a++){
		 for(int i=0;i<6;i++){
			 System .out.println("gun");
			 if (i==2){
				 System .out.println("gun");
			 }
		 }}
		if(number.isEmpty())
		{
			result = number;
		}else{
			result = "huanyige is null!s";
			
		}
		RequestDispatcher   requestDispatcher=req.getRequestDispatcher("test2.jsp");   
		req.setAttribute("result", result);
		requestDispatcher.forward(req,resp);
	
	}
	
}
